package serviceImp;

import entity.hotel_order;
import entity.hotel_room;
import entity.hotel_tenant;
import mapper.HotelOrderMapper;
import service.HotelOrderService;

import java.util.List;

public class HotelOrderServiceImp implements HotelOrderService {
    HotelOrderMapper hotelOrderMapper = new HotelOrderMapper();
    @Override
    public int orderCreate(hotel_order hotel_order) {
        return hotelOrderMapper.insertOrder(hotel_order);
    }

    @Override
    public List<hotel_order> orderInfo() {
        return hotelOrderMapper.selectAllOrder();
    }

    @Override
    public int tenantCreate(hotel_tenant hotel_tenant) {
        return hotelOrderMapper.insertTenant(hotel_tenant);
    }

    @Override
    public List<hotel_tenant> tenantInfo() {
        return null;
    }

    @Override
    public List<hotel_room> selectRoomByClass(String room_class) {
        return hotelOrderMapper.selectByClass(room_class);
    }

    @Override
    public List<hotel_order> selectAllOrder() {
        return hotelOrderMapper.selectAllOrder();
    }

    @Override
    public List<hotel_tenant> selectAllTenant() {
        return hotelOrderMapper.selectAllTenant();
    }

    @Override
    public int roomStatusChange(String room_no,String flag) {
        return hotelOrderMapper.ChangeRoomStatus(room_no,flag);
    }

    @Override
    public List<hotel_room> selectAllRoom() {
        return hotelOrderMapper.selectAllRoom();
    }

    @Override
    public int deleteTenant(String room_no) {
        return hotelOrderMapper.deleteTenant(room_no);
    }

    @Override
    public hotel_tenant selectTenantByRoomNo(String room_no) {
        return hotelOrderMapper.selectTenantByRoomNo(room_no);
    }

}
